<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: jetson-utils/glDisplay.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('glDisplay_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">glDisplay.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="glDisplay_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * copy of this software and associated documentation files (the &quot;Software&quot;),</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * to deal in the Software without restriction, including without limitation</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * Software is furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __GL_VIEWPORT_H__</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __GL_VIEWPORT_H__</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="glUtility_8h.html">glUtility.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="glTexture_8h.html">glTexture.h</a>&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;time.h&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classglDisplay.html">   38</a></span>&#160;<span class="keyword">class </span><a class="code" href="classglDisplay.html">glDisplay</a></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;{</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keyword">static</span> <a class="code" href="classglDisplay.html">glDisplay</a>* <a class="code" href="classglDisplay.html#a7bbeddde55655b595933142c3a616d1d">Create</a>( <span class="keywordtype">float</span> r=0.05f, <span class="keywordtype">float</span> g=0.05f, <span class="keywordtype">float</span> b=0.05f, <span class="keywordtype">float</span> a=1.0f );</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keyword">static</span> <a class="code" href="classglDisplay.html">glDisplay</a>* <a class="code" href="classglDisplay.html#a7bbeddde55655b595933142c3a616d1d">Create</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* title, <span class="keywordtype">float</span> r=0.05f, <span class="keywordtype">float</span> g=0.05f, <span class="keywordtype">float</span> b=0.05f, <span class="keywordtype">float</span> a=1.0f );</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <a class="code" href="classglDisplay.html#a3978a9f43490e6f19268ca5225679c60">~glDisplay</a>();</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#a33ed83d87e71cbfcef7347b41f541203">BeginRender</a>( <span class="keywordtype">bool</span> userEvents=<span class="keyword">true</span> );</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#a97612036c5849cb4d7026337f2603c87">EndRender</a>();</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#a528c58b4fcecd7d3d516f44de3233538">Render</a>( <a class="code" href="classglTexture.html">glTexture</a>* texture, <span class="keywordtype">float</span> x=5.0f, <span class="keywordtype">float</span> y=30.0f );</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#a528c58b4fcecd7d3d516f44de3233538">Render</a>( <span class="keywordtype">float</span>* image, uint32_t width, uint32_t height, <span class="keywordtype">float</span> x=0.0f, <span class="keywordtype">float</span> y=30.0f, <span class="keywordtype">bool</span> normalize=<span class="keyword">true</span> );</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#a616a3220a6575d31bad5de69eca71e0f">RenderOnce</a>( <span class="keywordtype">float</span>* image, uint32_t width, uint32_t height, <span class="keywordtype">float</span> x=5.0f, <span class="keywordtype">float</span> y=30.0f, <span class="keywordtype">bool</span> normalize=<span class="keyword">true</span> );</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#a12363aea016c16935833e2b58806d4c8">UserEvents</a>();</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                </div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#a5dd4727a6a11d533c49a37c68791123f">onEvent</a>( uint msg, <span class="keywordtype">int</span> a, <span class="keywordtype">int</span> b );</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classglDisplay.html#a7c96e8b41901e1b0555baef0433d5794">  112</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classglDisplay.html#a7c96e8b41901e1b0555baef0433d5794">IsOpen</a>()<span class="keyword"> const              </span>{ <span class="keywordflow">return</span> !<a class="code" href="classglDisplay.html#acd8adcb680935b9ea3ce974b141e5969">mWindowClosed</a>; }</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classglDisplay.html#a634ed5ff30a1d2944f3667157a649c9a">  117</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classglDisplay.html#a634ed5ff30a1d2944f3667157a649c9a">IsClosed</a>()<span class="keyword"> const            </span>{ <span class="keywordflow">return</span> <a class="code" href="classglDisplay.html#acd8adcb680935b9ea3ce974b141e5969">mWindowClosed</a>; }</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classglDisplay.html#a130822b4a5eda58692c0899627790700">  122</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">float</span> <a class="code" href="classglDisplay.html#a130822b4a5eda58692c0899627790700">GetFPS</a>()<span class="keyword"> const             </span>{ <span class="keywordflow">return</span> 1000000000.0f / <a class="code" href="classglDisplay.html#a5696e63a87c34b0d50d1615bca5072ad">mAvgTime</a>; }</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classglDisplay.html#a438d449fcde781da3d817855768ff1fd">  127</a></span>&#160;        <span class="keyword">inline</span> uint32_t <a class="code" href="classglDisplay.html#a438d449fcde781da3d817855768ff1fd">GetWidth</a>()<span class="keyword"> const        </span>{ <span class="keywordflow">return</span> <a class="code" href="classglDisplay.html#a2dd92f37832e555d1475e5f8c2484043">mWidth</a>; }</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="classglDisplay.html#a7d1a9d351c3245607283c6d40af5d6d7">  132</a></span>&#160;        <span class="keyword">inline</span> uint32_t <a class="code" href="classglDisplay.html#a7d1a9d351c3245607283c6d40af5d6d7">GetHeight</a>()<span class="keyword"> const       </span>{ <span class="keywordflow">return</span> <a class="code" href="classglDisplay.html#aee7874bab6e7f29546cd0d3ad04b424a">mHeight</a>; }</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#a4a4943779f0d036af2e49fc9d9a8aade">SetTitle</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* str );</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classglDisplay.html#aeccd8e8b25430ff8f9cf91cf79a4d7fa">  146</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classglDisplay.html#aeccd8e8b25430ff8f9cf91cf79a4d7fa">SetBackgroundColor</a>( <span class="keywordtype">float</span> r, <span class="keywordtype">float</span> g, <span class="keywordtype">float</span> b, <span class="keywordtype">float</span> a )    { <a class="code" href="classglDisplay.html#a56e08dd6f4895451391ff9ce7e7b9390">mBgColor</a>[0] = r; <a class="code" href="classglDisplay.html#a56e08dd6f4895451391ff9ce7e7b9390">mBgColor</a>[1] = g; <a class="code" href="classglDisplay.html#a56e08dd6f4895451391ff9ce7e7b9390">mBgColor</a>[2] = b; <a class="code" href="classglDisplay.html#a56e08dd6f4895451391ff9ce7e7b9390">mBgColor</a>[3] = a; }</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classglDisplay.html#a1fc9d28ddbc0f849aea7b80e96b09a68">  151</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classglDisplay.html#a1fc9d28ddbc0f849aea7b80e96b09a68">DEFAULT_TITLE</a>;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <a class="code" href="classglDisplay.html#a3a192a037ecc3e0f568dc439e4b4c4af">glDisplay</a>();</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;                </div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classglDisplay.html#a2d545e3ad748e899a413b1c954dc06d4">initWindow</a>();</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classglDisplay.html#a022eebf333e5acf6df0fcf2f632a470a">initGL</a>();</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <a class="code" href="classglTexture.html">glTexture</a>* <a class="code" href="classglDisplay.html#a6553b4eee50dfa0ddedd0960123583df">allocTexture</a>( uint32_t width, uint32_t height );</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="classglDisplay.html#a987e05d68219418d2d232665d92cc1a2">  161</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classglDisplay.html#a987e05d68219418d2d232665d92cc1a2">screenIdx</a> = 0;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                </div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classglDisplay.html#ad809588391d7a2edafb0df1ea96ac35a">  163</a></span>&#160;        Display*     <a class="code" href="classglDisplay.html#ad809588391d7a2edafb0df1ea96ac35a">mDisplayX</a>;</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="classglDisplay.html#a90154b9452e23a0665360e2008950e23">  164</a></span>&#160;        Screen*      <a class="code" href="classglDisplay.html#a90154b9452e23a0665360e2008950e23">mScreenX</a>;</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="classglDisplay.html#a327c40adf83a91f4fb4916bc577ae0ab">  165</a></span>&#160;        XVisualInfo* <a class="code" href="classglDisplay.html#a327c40adf83a91f4fb4916bc577ae0ab">mVisualX</a>;</div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classglDisplay.html#a59861c4376b388d34c57f06c9a460e97">  166</a></span>&#160;        Window       <a class="code" href="classglDisplay.html#a59861c4376b388d34c57f06c9a460e97">mWindowX</a>;</div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classglDisplay.html#aecdedd41e0d674fb614b88fd9ca9fa15">  167</a></span>&#160;        GLXContext   <a class="code" href="classglDisplay.html#aecdedd41e0d674fb614b88fd9ca9fa15">mContextGL</a>;</div><div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="classglDisplay.html#acd8adcb680935b9ea3ce974b141e5969">  168</a></span>&#160;        <span class="keywordtype">bool</span>               <a class="code" href="classglDisplay.html#acd8adcb680935b9ea3ce974b141e5969">mWindowClosed</a>;</div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="classglDisplay.html#a4d20a9b3eb655b1719c3896f9af608e4">  169</a></span>&#160;        Atom               <a class="code" href="classglDisplay.html#a4d20a9b3eb655b1719c3896f9af608e4">mWindowClosedMsg</a>;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="classglDisplay.html#a2dd92f37832e555d1475e5f8c2484043">  171</a></span>&#160;        uint32_t <a class="code" href="classglDisplay.html#a2dd92f37832e555d1475e5f8c2484043">mWidth</a>;</div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classglDisplay.html#aee7874bab6e7f29546cd0d3ad04b424a">  172</a></span>&#160;        uint32_t <a class="code" href="classglDisplay.html#aee7874bab6e7f29546cd0d3ad04b424a">mHeight</a>;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="classglDisplay.html#a060f50c9661124d2d8aa457dfe30d4bc">  174</a></span>&#160;        timespec <a class="code" href="classglDisplay.html#a060f50c9661124d2d8aa457dfe30d4bc">mLastTime</a>;</div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classglDisplay.html#a5696e63a87c34b0d50d1615bca5072ad">  175</a></span>&#160;        <span class="keywordtype">float</span>    <a class="code" href="classglDisplay.html#a5696e63a87c34b0d50d1615bca5072ad">mAvgTime</a>;</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classglDisplay.html#a56e08dd6f4895451391ff9ce7e7b9390">  176</a></span>&#160;        <span class="keywordtype">float</span>    <a class="code" href="classglDisplay.html#a56e08dd6f4895451391ff9ce7e7b9390">mBgColor</a>[4];</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classglDisplay.html#a927c5467f9926f769d96ab60c0d55724">  178</a></span>&#160;        <span class="keywordtype">float</span>*   <a class="code" href="classglDisplay.html#a927c5467f9926f769d96ab60c0d55724">mNormalizedCUDA</a>;</div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="classglDisplay.html#ac3a52573738ea17a2dd9d4263c166759">  179</a></span>&#160;        uint32_t <a class="code" href="classglDisplay.html#ac3a52573738ea17a2dd9d4263c166759">mNormalizedWidth</a>;</div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="classglDisplay.html#aebc8ffc67311372c24f60a8c33652f48">  180</a></span>&#160;        uint32_t <a class="code" href="classglDisplay.html#aebc8ffc67311372c24f60a8c33652f48">mNormalizedHeight</a>;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="classglDisplay.html#a377aaed358a4452760e02580f89ac2ab">  182</a></span>&#160;        std::vector&lt;glTexture*&gt; <a class="code" href="classglDisplay.html#a377aaed358a4452760e02580f89ac2ab">mTextures</a>;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;};</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="ttc" id="classglDisplay_html_a90154b9452e23a0665360e2008950e23"><div class="ttname"><a href="classglDisplay.html#a90154b9452e23a0665360e2008950e23">glDisplay::mScreenX</a></div><div class="ttdeci">Screen * mScreenX</div><div class="ttdef"><b>Definition:</b> glDisplay.h:164</div></div>
<div class="ttc" id="classglDisplay_html_a060f50c9661124d2d8aa457dfe30d4bc"><div class="ttname"><a href="classglDisplay.html#a060f50c9661124d2d8aa457dfe30d4bc">glDisplay::mLastTime</a></div><div class="ttdeci">timespec mLastTime</div><div class="ttdef"><b>Definition:</b> glDisplay.h:174</div></div>
<div class="ttc" id="classglDisplay_html_a7c96e8b41901e1b0555baef0433d5794"><div class="ttname"><a href="classglDisplay.html#a7c96e8b41901e1b0555baef0433d5794">glDisplay::IsOpen</a></div><div class="ttdeci">bool IsOpen() const</div><div class="ttdoc">Returns true if the window is open. </div><div class="ttdef"><b>Definition:</b> glDisplay.h:112</div></div>
<div class="ttc" id="glUtility_8h_html"><div class="ttname"><a href="glUtility_8h.html">glUtility.h</a></div></div>
<div class="ttc" id="classglDisplay_html_aebc8ffc67311372c24f60a8c33652f48"><div class="ttname"><a href="classglDisplay.html#aebc8ffc67311372c24f60a8c33652f48">glDisplay::mNormalizedHeight</a></div><div class="ttdeci">uint32_t mNormalizedHeight</div><div class="ttdef"><b>Definition:</b> glDisplay.h:180</div></div>
<div class="ttc" id="classglDisplay_html_a1fc9d28ddbc0f849aea7b80e96b09a68"><div class="ttname"><a href="classglDisplay.html#a1fc9d28ddbc0f849aea7b80e96b09a68">glDisplay::DEFAULT_TITLE</a></div><div class="ttdeci">static const char * DEFAULT_TITLE</div><div class="ttdoc">Default title bar name. </div><div class="ttdef"><b>Definition:</b> glDisplay.h:151</div></div>
<div class="ttc" id="classglDisplay_html_a2d545e3ad748e899a413b1c954dc06d4"><div class="ttname"><a href="classglDisplay.html#a2d545e3ad748e899a413b1c954dc06d4">glDisplay::initWindow</a></div><div class="ttdeci">bool initWindow()</div></div>
<div class="ttc" id="classglDisplay_html_a56e08dd6f4895451391ff9ce7e7b9390"><div class="ttname"><a href="classglDisplay.html#a56e08dd6f4895451391ff9ce7e7b9390">glDisplay::mBgColor</a></div><div class="ttdeci">float mBgColor[4]</div><div class="ttdef"><b>Definition:</b> glDisplay.h:176</div></div>
<div class="ttc" id="classglDisplay_html_a59861c4376b388d34c57f06c9a460e97"><div class="ttname"><a href="classglDisplay.html#a59861c4376b388d34c57f06c9a460e97">glDisplay::mWindowX</a></div><div class="ttdeci">Window mWindowX</div><div class="ttdef"><b>Definition:</b> glDisplay.h:166</div></div>
<div class="ttc" id="classglDisplay_html_a4d20a9b3eb655b1719c3896f9af608e4"><div class="ttname"><a href="classglDisplay.html#a4d20a9b3eb655b1719c3896f9af608e4">glDisplay::mWindowClosedMsg</a></div><div class="ttdeci">Atom mWindowClosedMsg</div><div class="ttdef"><b>Definition:</b> glDisplay.h:169</div></div>
<div class="ttc" id="classglDisplay_html_aecdedd41e0d674fb614b88fd9ca9fa15"><div class="ttname"><a href="classglDisplay.html#aecdedd41e0d674fb614b88fd9ca9fa15">glDisplay::mContextGL</a></div><div class="ttdeci">GLXContext mContextGL</div><div class="ttdef"><b>Definition:</b> glDisplay.h:167</div></div>
<div class="ttc" id="classglDisplay_html_a7d1a9d351c3245607283c6d40af5d6d7"><div class="ttname"><a href="classglDisplay.html#a7d1a9d351c3245607283c6d40af5d6d7">glDisplay::GetHeight</a></div><div class="ttdeci">uint32_t GetHeight() const</div><div class="ttdoc">Get the height of the window (in pixels) </div><div class="ttdef"><b>Definition:</b> glDisplay.h:132</div></div>
<div class="ttc" id="classglDisplay_html_a616a3220a6575d31bad5de69eca71e0f"><div class="ttname"><a href="classglDisplay.html#a616a3220a6575d31bad5de69eca71e0f">glDisplay::RenderOnce</a></div><div class="ttdeci">void RenderOnce(float *image, uint32_t width, uint32_t height, float x=5.0f, float y=30.0f, bool normalize=true)</div><div class="ttdoc">Begin the frame, render one CUDA float4 image using OpenGL interop, and end the frame. </div></div>
<div class="ttc" id="classglDisplay_html_a927c5467f9926f769d96ab60c0d55724"><div class="ttname"><a href="classglDisplay.html#a927c5467f9926f769d96ab60c0d55724">glDisplay::mNormalizedCUDA</a></div><div class="ttdeci">float * mNormalizedCUDA</div><div class="ttdef"><b>Definition:</b> glDisplay.h:178</div></div>
<div class="ttc" id="classglDisplay_html_acd8adcb680935b9ea3ce974b141e5969"><div class="ttname"><a href="classglDisplay.html#acd8adcb680935b9ea3ce974b141e5969">glDisplay::mWindowClosed</a></div><div class="ttdeci">bool mWindowClosed</div><div class="ttdef"><b>Definition:</b> glDisplay.h:168</div></div>
<div class="ttc" id="classglDisplay_html_a634ed5ff30a1d2944f3667157a649c9a"><div class="ttname"><a href="classglDisplay.html#a634ed5ff30a1d2944f3667157a649c9a">glDisplay::IsClosed</a></div><div class="ttdeci">bool IsClosed() const</div><div class="ttdoc">Returns true if the window has been closed. </div><div class="ttdef"><b>Definition:</b> glDisplay.h:117</div></div>
<div class="ttc" id="classglDisplay_html_a438d449fcde781da3d817855768ff1fd"><div class="ttname"><a href="classglDisplay.html#a438d449fcde781da3d817855768ff1fd">glDisplay::GetWidth</a></div><div class="ttdeci">uint32_t GetWidth() const</div><div class="ttdoc">Get the width of the window (in pixels) </div><div class="ttdef"><b>Definition:</b> glDisplay.h:127</div></div>
<div class="ttc" id="classglDisplay_html_a5dd4727a6a11d533c49a37c68791123f"><div class="ttname"><a href="classglDisplay.html#a5dd4727a6a11d533c49a37c68791123f">glDisplay::onEvent</a></div><div class="ttdeci">void onEvent(uint msg, int a, int b)</div><div class="ttdoc">UI event handler. </div></div>
<div class="ttc" id="classglDisplay_html_a33ed83d87e71cbfcef7347b41f541203"><div class="ttname"><a href="classglDisplay.html#a33ed83d87e71cbfcef7347b41f541203">glDisplay::BeginRender</a></div><div class="ttdeci">void BeginRender(bool userEvents=true)</div><div class="ttdoc">Clear window and begin rendering a frame. </div></div>
<div class="ttc" id="classglDisplay_html_a5696e63a87c34b0d50d1615bca5072ad"><div class="ttname"><a href="classglDisplay.html#a5696e63a87c34b0d50d1615bca5072ad">glDisplay::mAvgTime</a></div><div class="ttdeci">float mAvgTime</div><div class="ttdef"><b>Definition:</b> glDisplay.h:175</div></div>
<div class="ttc" id="classglDisplay_html_aeccd8e8b25430ff8f9cf91cf79a4d7fa"><div class="ttname"><a href="classglDisplay.html#aeccd8e8b25430ff8f9cf91cf79a4d7fa">glDisplay::SetBackgroundColor</a></div><div class="ttdeci">void SetBackgroundColor(float r, float g, float b, float a)</div><div class="ttdoc">Set the background color. </div><div class="ttdef"><b>Definition:</b> glDisplay.h:146</div></div>
<div class="ttc" id="classglDisplay_html_a327c40adf83a91f4fb4916bc577ae0ab"><div class="ttname"><a href="classglDisplay.html#a327c40adf83a91f4fb4916bc577ae0ab">glDisplay::mVisualX</a></div><div class="ttdeci">XVisualInfo * mVisualX</div><div class="ttdef"><b>Definition:</b> glDisplay.h:165</div></div>
<div class="ttc" id="classglDisplay_html"><div class="ttname"><a href="classglDisplay.html">glDisplay</a></div><div class="ttdoc">OpenGL display window / video viewer. </div><div class="ttdef"><b>Definition:</b> glDisplay.h:38</div></div>
<div class="ttc" id="classglDisplay_html_a6553b4eee50dfa0ddedd0960123583df"><div class="ttname"><a href="classglDisplay.html#a6553b4eee50dfa0ddedd0960123583df">glDisplay::allocTexture</a></div><div class="ttdeci">glTexture * allocTexture(uint32_t width, uint32_t height)</div></div>
<div class="ttc" id="classglDisplay_html_a7bbeddde55655b595933142c3a616d1d"><div class="ttname"><a href="classglDisplay.html#a7bbeddde55655b595933142c3a616d1d">glDisplay::Create</a></div><div class="ttdeci">static glDisplay * Create(float r=0.05f, float g=0.05f, float b=0.05f, float a=1.0f)</div><div class="ttdoc">Create a new maximized openGL display window. </div></div>
<div class="ttc" id="classglDisplay_html_a987e05d68219418d2d232665d92cc1a2"><div class="ttname"><a href="classglDisplay.html#a987e05d68219418d2d232665d92cc1a2">glDisplay::screenIdx</a></div><div class="ttdeci">static const int screenIdx</div><div class="ttdef"><b>Definition:</b> glDisplay.h:161</div></div>
<div class="ttc" id="classglDisplay_html_ad809588391d7a2edafb0df1ea96ac35a"><div class="ttname"><a href="classglDisplay.html#ad809588391d7a2edafb0df1ea96ac35a">glDisplay::mDisplayX</a></div><div class="ttdeci">Display * mDisplayX</div><div class="ttdef"><b>Definition:</b> glDisplay.h:163</div></div>
<div class="ttc" id="classglDisplay_html_a022eebf333e5acf6df0fcf2f632a470a"><div class="ttname"><a href="classglDisplay.html#a022eebf333e5acf6df0fcf2f632a470a">glDisplay::initGL</a></div><div class="ttdeci">bool initGL()</div></div>
<div class="ttc" id="classglDisplay_html_a2dd92f37832e555d1475e5f8c2484043"><div class="ttname"><a href="classglDisplay.html#a2dd92f37832e555d1475e5f8c2484043">glDisplay::mWidth</a></div><div class="ttdeci">uint32_t mWidth</div><div class="ttdef"><b>Definition:</b> glDisplay.h:171</div></div>
<div class="ttc" id="classglDisplay_html_ac3a52573738ea17a2dd9d4263c166759"><div class="ttname"><a href="classglDisplay.html#ac3a52573738ea17a2dd9d4263c166759">glDisplay::mNormalizedWidth</a></div><div class="ttdeci">uint32_t mNormalizedWidth</div><div class="ttdef"><b>Definition:</b> glDisplay.h:179</div></div>
<div class="ttc" id="classglDisplay_html_a130822b4a5eda58692c0899627790700"><div class="ttname"><a href="classglDisplay.html#a130822b4a5eda58692c0899627790700">glDisplay::GetFPS</a></div><div class="ttdeci">float GetFPS() const</div><div class="ttdoc">Get the average frame time (in milliseconds). </div><div class="ttdef"><b>Definition:</b> glDisplay.h:122</div></div>
<div class="ttc" id="classglDisplay_html_a3a192a037ecc3e0f568dc439e4b4c4af"><div class="ttname"><a href="classglDisplay.html#a3a192a037ecc3e0f568dc439e4b4c4af">glDisplay::glDisplay</a></div><div class="ttdeci">glDisplay()</div></div>
<div class="ttc" id="classglDisplay_html_a377aaed358a4452760e02580f89ac2ab"><div class="ttname"><a href="classglDisplay.html#a377aaed358a4452760e02580f89ac2ab">glDisplay::mTextures</a></div><div class="ttdeci">std::vector&lt; glTexture * &gt; mTextures</div><div class="ttdef"><b>Definition:</b> glDisplay.h:182</div></div>
<div class="ttc" id="classglDisplay_html_a3978a9f43490e6f19268ca5225679c60"><div class="ttname"><a href="classglDisplay.html#a3978a9f43490e6f19268ca5225679c60">glDisplay::~glDisplay</a></div><div class="ttdeci">~glDisplay()</div><div class="ttdoc">Destroy window. </div></div>
<div class="ttc" id="classglDisplay_html_a4a4943779f0d036af2e49fc9d9a8aade"><div class="ttname"><a href="classglDisplay.html#a4a4943779f0d036af2e49fc9d9a8aade">glDisplay::SetTitle</a></div><div class="ttdeci">void SetTitle(const char *str)</div><div class="ttdoc">Set the window title string. </div></div>
<div class="ttc" id="classglDisplay_html_a12363aea016c16935833e2b58806d4c8"><div class="ttname"><a href="classglDisplay.html#a12363aea016c16935833e2b58806d4c8">glDisplay::UserEvents</a></div><div class="ttdeci">void UserEvents()</div><div class="ttdoc">Process UI events. </div></div>
<div class="ttc" id="classglTexture_html"><div class="ttname"><a href="classglTexture.html">glTexture</a></div><div class="ttdoc">OpenGL texture with CUDA interoperability. </div><div class="ttdef"><b>Definition:</b> glTexture.h:35</div></div>
<div class="ttc" id="classglDisplay_html_a528c58b4fcecd7d3d516f44de3233538"><div class="ttname"><a href="classglDisplay.html#a528c58b4fcecd7d3d516f44de3233538">glDisplay::Render</a></div><div class="ttdeci">void Render(glTexture *texture, float x=5.0f, float y=30.0f)</div><div class="ttdoc">Render an OpenGL texture. </div></div>
<div class="ttc" id="glTexture_8h_html"><div class="ttname"><a href="glTexture_8h.html">glTexture.h</a></div></div>
<div class="ttc" id="classglDisplay_html_aee7874bab6e7f29546cd0d3ad04b424a"><div class="ttname"><a href="classglDisplay.html#aee7874bab6e7f29546cd0d3ad04b424a">glDisplay::mHeight</a></div><div class="ttdeci">uint32_t mHeight</div><div class="ttdef"><b>Definition:</b> glDisplay.h:172</div></div>
<div class="ttc" id="classglDisplay_html_a97612036c5849cb4d7026337f2603c87"><div class="ttname"><a href="classglDisplay.html#a97612036c5849cb4d7026337f2603c87">glDisplay::EndRender</a></div><div class="ttdeci">void EndRender()</div><div class="ttdoc">Finish rendering and refresh / flip the backbuffer. </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_54a0acf6da04fe2ed9410b4c6369bc5d.html">jetson-utils</a></li><li class="navelem"><a class="el" href="glDisplay_8h.html">glDisplay.h</a></li>
    <li class="footer">Generated on Thu Sep 26 2019 12:19:11 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
